<script type="text/javascript" src="./public/js/order/order.js?v=20160507"></script>
<div class="mar_bot">
    <span class="col_title">搜索客户:</span>
    <br>
    <!--用于错误提示-->
    <div class="hide">客户</div>
    <div>
        <select id="customer_select" class="require"></select>
    </div>
</div>

<div class="mar_bot hide" id="customer_info">
    <span>客户信息:</span>
    <table class="table">
        <tr>
            <td width="300">地址:<span id="address"></span></td>
            <td width="300">日期:<span>{date('Y-m-d H:i:s',time())}</span></td>
        </tr>
        <tr>
            <td width="300">姓名:<span id="name"></span></td>
            <td width="300">电话:<span id="mobile"></span></td>
        </tr>
        <tr>
            <td width="300">余额:<span id="balance"></span></td>
            <td width="300">折扣:<span id="discount"></span></td>
        </tr>
    </table>
</div>

<div class="mar_bot hide" id="exp_charge">
    <span class="col_title">快递费:</span>
    <br>
    <div class="cus">
        <input type="text" class="int" id="exp_charge_val" name="exp_charge" value="10">
    </div>
</div>

<div class="mar_bot">
    <span class="col_title">选择产品:</span>
    <input type="hidden" id="customer_id">
    <table>
        <thead>
            <tr>
                {loop $thead $key $val}
                <td width={$val['width']}>{$val['name']}</td>
                {/loop}
            </tr>
        </thead>
        <tbody>
            <?php $count = ceil(count($products)/2)?>
            <?php for ($i = 0; $i < $count; $i++) {?>
            <tr class="tr">
                <?php if($products[$i]['id']){?>
                <td>{$products[$i]['id']}</td>
                <td class="product_id {if $products[$i]['count']<=5}col_danger{/if}" ids="{$products[$i]['id']}" name="{$products[$i]['product_name']}" price="{$products[$i]['price']}">{$products[$i]['product_name']}({$products[$i]['price']}库存:{$products[$i]['count']})</td>
                <td><input type="text" class="input int" name="p_count"></td>
                <?php }?>

                <?php if(isset($products[$count+$i]['id'])){?>
                <td>{$products[$count+$i]['id']}</td>
                <td class="product_id {if $products[$count+$i]['count']<=5}col_danger{/if}" ids="{$products[$count+$i]['id']}" name="{$products[$count+$i]['product_name']}" price="{$products[$count+$i]['price']}">{$products[$count+$i]['product_name']}({$products[$count+$i]['price']}库存:{$products[$count+$i]['count']})</td>
                <td><input type="text" class="input int" name="p_count"></td>
                <?php }?>
            </tr>
            <?php }?>
        </tbody>
    </table>
</div>

<div class="mar_bot">
    <span class="btn btn_suc submit">下单</span>
</div>

<div id="order_info" class="hide">
    <table>
        <thead>
            <tr>
                {loop $add_info_thead $key $val}
                <td width={$val['width']}px>{$val['name']}</td>
                {/loop}
            </tr>
        </thead>
        <tbody id="product_list">
        </tbody>
        <tfoot>
            <tr>
                <td>合计</td>
                <td id="order_origin_price">原价:</td>
                <td id="order_discount">折扣:</td>
                <td id="total_count">总数:</td>
                <td id="order_price">价格:</td>
            </tr>
        </tfoot>
    </table>
    <!--<p class="p">合计 <span id="order_origin_price" class="span_100">原价:</span><span id="order_discount" class="span_100">折扣:</span><span id="order_price" class="span_100">价格:</span></p>-->
</div>
